﻿<%@ Page Language="C#" MasterPageFile="~/Admin/Master/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="RoleList.aspx.cs" Inherits="HZ.DrugTrade.Web.Admin.RoleList" Title="无标题页" %>

<%--<%@ Register src="../Controls/wcChooseHospital.ascx" tagname="wcChooseHospital" tagprefix="uc1" %>--%>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div id="tabnav">
        <ul>
            <li class="active"><a href="javascript:void(0);">角色列表</a></li>
        </ul>
    </div>
    <div id="tabcontent">
        <table class="querylist">
            <tr>
                <td>
                    &nbsp;
                </td>
            </tr>
        </table>
    </div>
    <asp:GridView ID="gvwRoleList" CssClass="mainlist" runat="server" AutoGenerateColumns="False"
        DataKeyNames="RoleID" OnRowCommand="gvwRoleList_RowCommand" OnRowEditing="gvwRoleList_RowEditing"
        OnRowUpdating="gvwRoleList_RowUpdating" OnRowCancelingEdit="gvwRoleList_RowCancelingEdit">
        <Columns>
            <asp:TemplateField HeaderText="序号">
                <ItemTemplate>
                    <%#Container.DataItemIndex+1 %>
                </ItemTemplate>
                <HeaderStyle Width="40px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="角色名称">
                <ItemTemplate>
                    <asp:Label ID="lblRoleName" runat="server" Text='<%# DataBinder.Eval(Container,"DataItem.RoleName") %>'></asp:Label>
                </ItemTemplate>
                <EditItemTemplate>
                    <asp:TextBox ID="txtRoleName" runat="server" Text='<%# DataBinder.Eval(Container,"DataItem.RoleName") %>'></asp:TextBox>
                </EditItemTemplate>
                <HeaderStyle Width="250px" />
            </asp:TemplateField>
            <asp:TemplateField HeaderText="操作">
                <ItemTemplate>
                    <hz:HzLinkButton  ID="lbnEdit" runat="server" CommandName="Edit" Text="修改" OperateType="编辑"></hz:HzLinkButton>
                    |
                    <hz:HzLinkButton ID="lbtnDel" runat="server" CommandName="Del" OnClientClick="if(!this.disabled){return  confirm('确认要删除此行信息吗？');}else{return false;}"
                        Visible='<%# (bool)Eval("IsDefault")?false:true %>' CommandArgument='<%#Eval("RoleID") %>' OperateType="删除">删除</hz:HzLinkButton>
                    <asp:Literal ID="Literal1" runat="server" Text='<%# (bool)Eval("IsDefault")?"":"|" %>'></asp:Literal>
                    <%--<a href='RoleMod.aspx?roleId=<%# Eval("RoleId")  %> '>权限设置</a>--%>
                    <hz:HzLinkButton ID="HzButton1" runat="server" OnClientClick='<%# GetURLScript("RoleMod.aspx?roleId="+Eval("RoleId")) %>'
                        CausesValidation="false" Text='权限设置' OperateType="权限设置" />
                </ItemTemplate>
                <EditItemTemplate>
                    <hz:HzLinkButton ID="lbnUpdate" runat="server" CausesValidation="True" CommandName="Update"
                        Text="更新" OperateType="编辑" />
                    <hz:HzLinkButton ID="lbnCancel" runat="server" CausesValidation="False" CommandName="Cancel"
                        Text="取消" />
                </EditItemTemplate>
            </asp:TemplateField>
            <asp:BoundField DataField="IsDefault" HeaderText="是否默认" Visible="False" ReadOnly="true" />
        </Columns>
    </asp:GridView>
    <div class="listip">
        <ul>
            <li>说明：<span>说明信息</span></li>
        </ul>
    </div>
    <div class="listctrl">
        <hz:HzButton ID="btnAdd" runat="server" Text="增加角色" OnClick="btnAdd_Click" 
            CssClass="btn" OperateType="新增" />
    </div>
</asp:Content>
